#include <dockIcon.h>
#include <postManager.h>

namespace View {

  DockIcon::DockIcon(GooCanvasItem * newParent,gdouble x,gdouble y,GdkPixbuf *bg,GdkPixbuf *mg,GdkPixbuf *fg)
    :IconButton(newParent,x,y,bg,mg,fg)
  {
    
  }

  DockIcon::~DockIcon()
  {
    
  }

  bool DockIcon::OnClicked()
  {
    //    std::cout<<"Dock Icon On clicked....\n";
    Controller::PostManager *poster = Controller::PostManager::GetPostManager();
    poster->SetBroadcastType(Controller::BROADCAST_TYPE_CURRENT_ATTACK);
    poster->SetDoubleData(attackType);
    poster->SendBroadcast();
    return true;
  }

}
